package com.xiyue.server.controller;


import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaCheckRole;
import cn.dev33.satoken.annotation.SaMode;
import cn.dev33.satoken.session.SaSession;
import cn.dev33.satoken.stp.StpUtil;
import com.sport.common.web.controller.BaseController;
import com.sport.common.web.model.Result;
import com.xiyue.server.annotation.RestControllerMapping;
import com.xiyue.server.service.SysUserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@RestControllerMapping("test")
public class TestController extends BaseController {

    @Resource
    private SysUserService sysUserService;

    @GetMapping
    public Result<Object> testSaSession(){
        SaSession session = StpUtil.getSession();
        Object menu = session.get("menu");
        return Result.success(menu);
    }
}
